package cn.buyclss.backend.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author: Cecurio
 * @create: 2019-03-18 22:20
 **/
public class CheckUtils {
    public static boolean validEmail(String mail) {
        String regex = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(mail);
        return m.find();
    }
}
